<template>
  <div class="ord">
    <div class="tit">
      <van-nav-bar
        title="我的订单"
        left-text="返回"
        left-arrow
        right-text="历史订单"
        @click-left="onClickL"
        @click-right="onClickR"
      />
    </div>
    <!-- tab -->
    <div class="tab">
      <van-tabs :v-model="actives">
        <van-tab title="全部">
          <!-- 咨询 -->
          <div class="content">
            <div class="flex">
              <div class="imgs">
                <img src="" alt="" />
              </div>
              <div class="zixun">
                <p>电话咨询</p>
                <p>购买资格:24小时</p>
              </div>
              <div class="qian">
                <p>￥<span>68</span></p>
              </div>
            </div>

            <div class="time">
              <p class="nian">2022-03-16</p>
              <p class="shijian">13:45:31</p>
            </div>

            <div class="bottom">
              <div class="xiangq">
                <p>查看详情</p>
                <p>已完成支付</p>
              </div>
            </div>
          </div>
        </van-tab>
        <van-tab title="已支付"></van-tab>
        <van-tab title="已完成"></van-tab>
        <van-tab title="已退款"></van-tab>
      </van-tabs>
    </div>

    <!-- 入住律师 -->
    <div class="intake">
      <p>入驻律师遍布全国</p>
      <div class="consult" @click="query">立即查询</div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      actives: 0,
    };
  },

  methods: {
    onClickL() {
      this.$router.go(-1);
    },
    onClickR() {
      console.log("点击了");
    },
  },
};
</script>

<style lang="scss" scoped>
.ord {
  height: 100%;
  background: #efefef 100%;
  .tit {
    .van-nav-bar {
      ::v-deep .van-icon {
        color: #333333;
      }
      ::v-deep .van-nav-bar__text {
        font-size: 0.15rem;
        color: #333333;
      }
    }
  }
}

.tab {
  .content {
    width: 345px;
    height: 133px;
    margin: 10px auto;
    line-height: 20px;
    border-radius: 14px;
    overflow: hidden;
    background-color: #ffffff;
    text-align: center;
    .flex {
      margin-top: 20px;
      margin-left: 20px;
      display: flex;
      .imgs {
        width: 40px;
        height: 40px;
        background: rgb(162, 150, 150);
        border-radius: 8px;
      }
      .zixun {
        :nth-child(1) {
          font-weight: 600;
        }
        :nth-child(2) {
          font-size: 13px;
        }
        margin-left: 10px;
        text-align: left;
        flex: 1;
      }
      .qian {
        width: 40px;
        height: 40px;
        margin-top: 8px;
        line-height: 40px;
        margin-right: 30px;
      }
    }

    .time {
      display: flex;
      font-size: 12px;
      width: 100%;
      height: 25px;
      margin-left: 10px;
      .nian {
        margin: 0 10px;
      }
    }
    .bottom {
      width: 100%;
      height: 45px;
      border-top: 1px #efefef solid;
      .xiangq {
        display: flex;
        justify-content: space-between;
        :nth-child(1) {
          width: 69px;
          height: 22px;
          margin-left: 20px;
          margin-top: 7px;
          line-height: 22px;
          font-size: 12px;
          border-radius: 11px;
          cursor: pointer;
          border: 1px solid rgb(221, 219, 219);
        }
        :nth-child(2) {
          margin-top: 9px;
          margin-right: 20px;
          font-size: 15px;
        }
      }
    }
  }
}

/* 入住 */
.intake {
  width: 345px;
  height: 89px;
  border-radius: 14px;
  text-align: center;
  color: #6c6c6c;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.4rem;
  margin: auto;
  background: #cecece 100%;
  :nth-child(1) {
    margin: 10px 0;
    font-size: 26px;
  }
  .consult {
    width: 69px;
    height: 22px;
    margin: 0 auto;
    border-radius: 11px;
    border: 1px solid rgba(154, 154, 154, 100);
    font-size: 11px;
    line-height: 22px;
  }
}
</style>
